From c791185c20c90d0bc3d2a7d329834bd4a81800a9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jonas=20=C3=85dahl?= Date: Sat, 5 Dec 2020 11:30:45 +0100 Subject: [PATCH] x11/surface: Remember the toplevel layout --- gdk/x11/gdksurface-x11.c | 4 ++++ gdk/x11/gdksurface-x11.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/gdk/x11/gdksurface-x11.c b/gdk/x11/gdksurface-x11.c index 8c65183f5d..b5db385093 100644 --- a/gdk/x11/gdksurface-x11.c +++ b/gdk/x11/gdksurface-x11.c @@ -1580,6 +1580,7 @@ gdk_x11_surface_hide (GdkSurface *surface) NextRequest (GDK_SURFACE_XDISPLAY (surface))); g_clear_handle_id (&impl->compute_size_source_id, g_source_remove); + g_clear_pointer (&impl->toplevel_layout, gdk_toplevel_layout_unref); gdk_x11_surface_withdraw (surface); } @@ -5054,6 +5055,9 @@ gdk_x11_toplevel_present (GdkToplevel *toplevel, gdk_x11_surface_unminimize (surface); + g_clear_pointer (&impl->toplevel_layout, gdk_toplevel_layout_unref); + impl->toplevel_layout = gdk_toplevel_layout_copy (layout); + monitor = gdk_display_get_monitor_at_surface (display, surface); if (monitor) { diff --git a/gdk/x11/gdksurface-x11.h b/gdk/x11/gdksurface-x11.h index 994d125036..134ebdf617 100644 --- a/gdk/x11/gdksurface-x11.h +++ b/gdk/x11/gdksurface-x11.h @@ -72,6 +72,8 @@ struct _GdkX11Surface int unscaled_width; int unscaled_height; + GdkToplevelLayout *toplevel_layout; + struct { int configured_width; int configured_height; -- 2.30.2